<!--
  @author tanbiao
  @since 2019-11-21 18:56:50
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<!--搜索条件置于单独的layui-card-body中
    -->
<div class="layui-card-body" th:fragment="query">
    <!--用于保存或传值的隐藏表单元素
        置于form标签内的最上方
        -->

    <!--每个zmn-form-item一行，每行4列
       支持页面自适应，1280分辨率下不折行
       -->
    <div class="zmn-form-item">

        <!--默认情况下标签item-inline占据1列，
            加入样式col2，表示该item-inline占据2列，用于支持多级联动下拉框
            -->
        <div class="item-inline">
            <label class="inline-label">ID/名称：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <!--默认情况下标签box-input-inline占满整个inline-box-cc标签-->
                    <div class="box-input-inline">
                        <input type="hidden" id="tariffId" name="tariffId" th:value="${vo.tariffId}"/>
                        <input type="hidden" id="flag" name="flag" th:value="${vo.flag}"/>
                        <input type="text" name="nameOrId" th:value="${vo.nameOrId}" placeholder="请输入产品名称/ID" autocomplete="off" class="layui-input"
                               maxlength="20"/>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline">
            <label class="inline-label">服务分类：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <select id="servCategId" name="servCategId" lay-filter="servCategId" value="0"  lay-search="">
                            <option value="0" th:selected="${0 == vo.servCategId}">-选择-</option>
                            <option th:value="${item.categId}" th:selected="${item.categId == vo.servCategId}" th:text="${item.name}"
                                    th:each="item:${servCategories}">分类
                            </option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
        <div class="item-inline">
            <label class="inline-label">一级分类：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <select id="categOneId" name="categOneId" lay-filter="categOneId" value="0"  lay-search="">
                            <option value="0" th:selected="${0 == vo.categOneId}">-选择-</option>
                            <option th:value="${item.categId}" th:selected="${item.categId == vo.categOneId}" th:text="${item.name}"
                                    th:each="item:${baseCategories}">分类
                            </option>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline">
            <label class="inline-label">二级分类：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <select id="categId" name="categId" lay-filter="categId" value="0"  lay-search="">
                            <option value="0" th:selected="${0 == vo.categId}">-选择-</option>
                            <option th:value="${item.categId}" th:selected="${item.categId == vo.categId}" th:text="${item.categName}"
                                    th:each="item:${baseCategoryTwoList}">分类
                            </option>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-split">&nbsp;</div>
        <div class="layui-split">&nbsp;</div>

        <div class="item-inline">
            <label class="inline-label">产品状态：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <select id="productStatus" name="productStatus" value="0">
                            <option value="0" th:selected="${0 == vo.productStatus}">-选择-</option>
                            <option value="1" th:selected="${vo.productStatus == 1}">下架</option>
                            <option value="2" th:selected="${vo.productStatus == 2}">上架</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline">
            <label class="inline-label">产品类型：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <select id="productType" name="productType" value="0">
                            <option value="0" th:selected="${0 == vo.productType}">-选择-</option>
                            <option value="1" th:selected="${vo.productType == 1}">通用产品</option>
                            <option value="2" th:selected="${vo.productType == 2}">渠道产品</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline">
            <label class="inline-label">二级渠道：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <select id="channelId" name="channelId" lay-filter="channelId" value="0"  lay-search="">
                            <option value="0" th:selected="${0 == vo.servCategId}">-选择-</option>
                            <option th:value="${item.channelId}" th:selected="${item.channelId == vo.channelId}" th:text="${item.name}"
                                    th:each="item:${channelLevelTwos}">分类
                            </option>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline">
            <label class="inline-label">价格状态：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <select id="status" name="status" value="0">
                            <option value="0" th:selected="${0 == vo.status}">-选择-</option>
                            <option value="1" th:selected="${vo.status == 1}">停用</option>
                            <option value="2" th:selected="${vo.status == 2}">正常</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-submit">
            <!--查询与重置按钮
           查询按钮lay-filter属性统一定义为zmn-form-submit
           如查询条件较多，为节省横向空间，查询按钮使用小按钮(无文字“查询”)
           -->
            <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="zmn-form-submit"><i class="layui-icon">&#xe615;</i> </button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm" lay-submit="" lay-filter="zmn-form-reset"><i class="layui-icon">&#xe669;</i></button>
            <!--导出excel-->
            <button class="layui-btn d-button" lay-submit lay-filter="query-export" id="query-export" style="display: none"></button>
        </div>

        <div class="layui-split">&nbsp;</div>
        <div class="layui-split">&nbsp;</div>

    </div>

</div>
